import 'package:json_annotation/json_annotation.dart';
part 'Resp.g.dart';

@JsonSerializable()
class R{
  @JsonKey(name: 'code')
  int code;
  @JsonKey(name: 'msg')
  String? msg;
  @JsonKey(name: 'data')
  dynamic? data;

  R({required this.code, required this.msg, required this.data});

  factory R.fromJson(Map<String, dynamic> json) =>
      _$RFromJson(json);

  Map<String, dynamic> toJson() =>
      _$RToJson(this);

  @override
  String toString() {
    return 'R{code: $code -> ${code.runtimeType}, msg: $msg -> ${msg.runtimeType}, data: $data -> ${data.runtimeType}}';
  }
}